package com.fantaike.algorithm.sort;

import lombok.*;

/**
 * 学生类
 * @author jishushen
 * @create 2021-07-25 17:11
 */
@Data
@AllArgsConstructor@NoArgsConstructor
public class Student implements Comparable<Student>{

    private String username;
    private Integer age;

    @Override
    public int compareTo(Student o) {
        return this.getAge() - o.getAge();
    }
}
